package com.ruoyi.find.controller;

import com.alibaba.fastjson2.JSON;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: TODO
 * @author LiuWei Chen
 * @date 2025/9/25 11:49
 * @version 1.0
 */

@RestController
@RequestMapping("/thread")
public class ThreadController {
    @GetMapping
    public String testThread(){
        new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("线程启动");
            }
        }).start();
        new Thread(()->{
            for (int i = 0; i < 100; i++){
                System.out.println("线程1-"+i);
            }
        }).start();
        return "success";
    }

}
